<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>APK管理|升级包</title>
<@fm.header />
<style>
.provinceClass label {
	font-size: 12px;
	float:left;
	margin:2px;
	width:80px;
	height:20px;
}
</style>
</head>
<body>
<div class="easyui-layout" style="text-align: center; height: 270px;" fit="true">
	<div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
	<form id="ff" method="post" enctype="multipart/form-data">
	    <table>
	        <tr>
	            <td><label for="marketplace">应用市场:</label></td>
	            <td><input class="easyui-validatebox" type="text" name="marketplace" value="${uab.marketplace}" readonly="readonly"></input>
	        </tr>
	         <tr>
	            <td><label for="num">每分钟下发量:</label></td>
	            <td><input class="easyui-validatebox" type="text" name="num" value="${uab.num}" readonly="readonly"></input>
	        </tr>
	        <tr>
	            <td><label for="apkUpload">apk:</label></td>
	            <td colspan=3>
	            	<input type="file" name="file" id="apk" disabled="disabled"></input>
	            	<input id="apkPath" type="text" readonly="readonly" style="width:200px" name="apkPath" value="${uab.apkPath}" ></input>
	            </td>
	        </tr>
	    </table>
	    <input type="hidden" id="id" name="id" value="${id}">
	</form>
	</div>
	<div region="south" border="false" style="text-align: center; padding: 5px 5px 5px 0;">
	    <a href="javascript:void(0)" class="easyui-linkbutton" onclick="del();">删除升级包</a>
	</div>
</div>

<script>
function del() {
  var id = $("#id").val();
  $.messager.confirm('温馨提醒', '你确定删除本条数据吗？', function(r) {
        if (r) {
            $.ajax({
                    url : '/apkconfig/delUpgradeApk',
                    data : {
                        id : id
                    },
                    type : "POST",
                    datatype : "json",
                    async : true,
                    success : function(data) {
                        showProcess(false);
                        if (data.return_code == '1') {
                            top.showMsg(market.content.title, data.return_msg, alert);
                            if (parent !== undefined) {
                                if ($.isFunction(parent.reloadParent)) {
                                    parent.reloadParent.call();
                                    parent.closeMyWindow();
                                } else {
                                    parent.$("#tt").datagrid('reload');
                                    parent.closeMyWindow();
                                }
                            }
                        }else if(data.return_code == '10'){
                            $.messager.alert(market.content.title, data.return_msg);
                            if (parent !== undefined) {
                                if ($.isFunction(parent.reloadParent)) {
                                    parent.reloadParent.call();
                                    parent.closeMyWindow();
                                } else {
                                    parent.$("#tt").datagrid('reload');
                                    parent.closeMyWindow();
                                }
                            }
                        } else {
                            $.messager.alert(market.content.title, data.return_msg);
                        }
                    },
                    error : function(data) {
                        showMsg("温馨提示", data, alert);
                    }
                });
         }
    });
}
</script>
</body>
</html>